﻿using System;
using System.Collections.Generic;

namespace RxjhServer
{
	public class ShotClass
	{
		private int _FLD_NID;

		private int _FLD_INDEX;

		private int _FLD_PID;

		private int _FLD_NJ;

		private int _FLD_MAGIC0;

		private int _FLD_MAGIC1;

		private int _FLD_MAGIC2;

		private int _FLD_MAGIC3;

		private int _FLD_MAGIC4;
        private int _WX;
        private int _NEEDWX;
        public int FLD_NID
		{
			get
			{
				return this._FLD_NID;
			}
			set
			{
				this._FLD_NID = value;
			}
		}

		public int FLD_INDEX
		{
			get
			{
				return this._FLD_INDEX;
			}
			set
			{
				this._FLD_INDEX = value;
			}
		}

		public int FLD_PID
		{
			get
			{
				return this._FLD_PID;
			}
			set
			{
				this._FLD_PID = value;
			}
		}

		public int FLD_NJ
		{
			get
			{
				return this._FLD_NJ;
			}
			set
			{
				this._FLD_NJ = value;
			}
		}

		public int FLD_MAGIC0
		{
			get
			{
				return this._FLD_MAGIC0;
			}
			set
			{
				this._FLD_MAGIC0 = value;
			}
		}

		public int FLD_MAGIC1
		{
			get
			{
				return this._FLD_MAGIC1;
			}
			set
			{
				this._FLD_MAGIC1 = value;
			}
		}

		public int FLD_MAGIC2
		{
			get
			{
				return this._FLD_MAGIC2;
			}
			set
			{
				this._FLD_MAGIC2 = value;
			}
		}

		public int FLD_MAGIC3
		{
			get
			{
				return this._FLD_MAGIC3;
			}
			set
			{
				this._FLD_MAGIC3 = value;
			}
		}
        public int NEEDWX
        {
            get
            {
                return this._NEEDWX;
            }
            set
            {
                this._NEEDWX = value;
            }
        }
        public int WX
        {
            get
            {
                return this._WX;
            }
            set
            {
                this._WX = value;
            }
        }
        public int FLD_MAGIC4
		{
			get
			{
				return this._FLD_MAGIC4;
			}
			set
			{
				this._FLD_MAGIC4 = value;
			}
		}

		public int FLD_MAGICZh
		{
			get
			{
				int num = 0;
				if (this._FLD_MAGIC1 != 0)
				{
					num++;
				}
				if (this._FLD_MAGIC2 != 0)
				{
					num++;
				}
				if (this._FLD_MAGIC3 != 0)
				{
					num++;
				}
				if (this._FLD_MAGIC4 != 0)
				{
					num++;
				}
				return num;
			}
		}

		public static List<ShotClass> GetShotList(int id)
		{
			List<ShotClass> list = new List<ShotClass>();
			foreach (ShotClass current in World.Shot)
			{
				if (current.FLD_NID == id)
				{
					list.Add(current);
				}
			}
			return list;
		}

		public static ShotClass Getwp(int id)
		{
			foreach (ShotClass current in World.Shot)
			{
				if (current.FLD_PID == id)
				{
					return current;
				}
			}
			return null;
		}

		public static int GetShot(int id)
		{
			int num = 0;
			foreach (ShotClass current in World.Shot)
			{
				if (current.FLD_NID == id)
				{
					num++;
				}
			}
			return num;
		}
	}
}
